# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-fado
pkgname=('python2-fado' 'python-fado')
_pkgname=FAdo
pkgver=2.2.0
pkgrel=2
pkgdesc='Formal Languages manipulation module.'
arch=('any')
url='https://pypi.org/project/FAdo/#files'
license=('GPL')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/FAdo-$pkgver.tar.gz")
sha512sums=('45bbaf3944669772c961ca0dc073142c1ddc177b7b0b68d6600d8c74e3e5848ff1702b91f06de37c3ccbcb76c2c4694036a95495bae76abc249236e4488fc44c')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"

  python setup.py build
}

package_python2-fado() {
  depends=('python2')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

package_python-fado() {
  depends=('python')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

